package com.mz.mattress.admin.api.admin;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.mz.mattress.admin.api.req.MemberCardQueryReq;
import com.mz.mattress.admin.service.MemberCardService;
import com.mz.mattress.api.common.Constants;
import com.mz.mattress.api.common.Result;
import com.mz.mattress.api.entity.MemberCard;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping(Constants.ADMIN_PATH + "memberCard")
public class MemberCardController {

    @Autowired
    private MemberCardService memberCardService;

    @GetMapping("/listPage")
    public Result<IPage<MemberCard>> listPage(MemberCardQueryReq req) {
        return memberCardService.listAdminPage(req);
    }

}
